<?php
/**
 * 短信验证码管理
 * Created by gii.
 * User: Gii
 * Date: 2023/02/23
 * Time: 16:16
 */

namespace app\admin\model\model\system;

use app\admin\model\entity\system\UserCodeEntity;
use app\admin\model\traits\Common;
use think\Model;

class UserCode extends Model
{
    use Common;
    use UserCodeEntity;

    protected $name = 'system_user_code';

    const USED_NO = 0;  // 未使用
    const USED_YES = 1; // 已使用

	public static function status($id, $status) {
        $data = [
            'id' => $id,
            'status' => $status,
        ];
        self::updateCommon($data);
        return true;
    }
}
